<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@page import="com.lavegue.model.Area" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>用户管理-->>批量导入用户</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<script type='text/javascript' src='dwr/interface/userdwr.js'></script>
     <script type='text/javascript' src='dwr/interface/areadwr.js'></script>
	<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
	<script type='text/javascript' src='js/jquery.validate.min.js'></script>
 	<script type='text/javascript' src='js/common.js'></script>
	<meta http-equiv="pragma" content="no-cache" />
	 <script type='text/javascript' src='<%=basePath %>/dwr/engine.js'></script>
	 <script type='text/javascript' src='<%=basePath %>/dwr/util.js'></script>
	<link href="images/css.css"  rel="stylesheet" type="text/css" />
      <link href="backStageManage/bs.css"  rel="stylesheet" type="text/css" />
	<script language="javascript" type="text/javascript" src="<%=basePath %>/date/WdatePicker.js"></script>
	<SCRIPT type="text/javascript" src="js/jquery-latest.pack.js"></SCRIPT>
	<SCRIPT type="text/javascript" src="js/dialog2.js" ></SCRIPT>

<style type="text/css">
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
.STYLE14 {color: #F58000}
.STYLE15 {color: #F18910}
.STYLE16 {color: #F75200}

</style>
<style type=text/css>
<%--BODY {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 12px; BACKGROUND: #333; PADDING-BOTTOM: 50px; MARGIN: 0px; LINE-HEIGHT: 14px; PADDING-TOP: 50px
}--%>
FORM {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
UL {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
OL {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
H1 {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
H2 {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
H3 {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
H4 {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
H5 {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
H6 {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
P {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px
}
INPUT {
	FONT-SIZE: 12px
}
TEXTAREA {
	FONT-SIZE: 12px
}
SELECT {
	FONT-SIZE: 12px
}
BUTTON {
	FONT-SIZE: 12px
}
IMG {
	BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BORDER-BOTTOM-STYLE: none
}
EM {
	FONT-STYLE: normal
}
CITE {
	FONT-SIZE: 12px; COLOR: #999; FONT-STYLE: normal
}
SMALL {
	FONT-SIZE: 12px; COLOR: #999; FONT-STYLE: normal
}
ADDRESS {
	FONT-SIZE: 12px; COLOR: #999; FONT-STYLE: normal
}
A {
	COLOR: #00f; TEXT-DECORATION: underline
}
#floatBoxBg {
	BACKGROUND: #000; FILTER: alpha(opacity=50); LEFT: 0px; WIDTH: 100%; POSITION: absolute; TOP: 0px; HEIGHT: 100%; opacity: 0.5
}
.floatBox {
	BORDER-RIGHT: #666 5px solid; BORDER-TOP: #666 5px solid; LEFT: 40%; BORDER-LEFT: #666 5px solid; WIDTH: 300px; BORDER-BOTTOM: #666 5px solid; POSITION: absolute; TOP: 50px
}
.floatBox .title {
	PADDING-RIGHT: 10px; PADDING-LEFT: 10px; BACKGROUND: #333; PADDING-BOTTOM: 0px; COLOR: #fff; PADDING-TOP: 7px; HEIGHT: 23px
}
.floatBox .title H4 {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 14px; FLOAT: left; PADDING-BOTTOM: 0px; MARGIN: 0px; LINE-HEIGHT: 16px; PADDING-TOP: 0px
}
.floatBox .title SPAN {
	FLOAT: right; CURSOR: pointer
}
.floatBox .content {
	PADDING-RIGHT: 15px; PADDING-LEFT: 15px; BACKGROUND: #fff; PADDING-BOTTOM: 20px; PADDING-TOP: 20px
}
#box {
	PADDING-RIGHT: 20px; PADDING-LEFT: 20px; FONT-SIZE: 14px; BACKGROUND: #999; PADDING-BOTTOM: 20px; MARGIN: 0px 50px; PADDING-TOP: 20px
}
#box H1 {
	FONT-SIZE: 40px; LINE-HEIGHT: 50px; HEIGHT: 90px
}
#box #testFloatBox {
	MARGIN: 20px 0px; POSITION: static
}
#box TABLE {
	MARGIN: 20px 0px
}
#box H3 {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 16px; PADDING-BOTTOM: 10px; PADDING-TOP: 20px
}
CODE {
	DISPLAY: block; FONT-SIZE: 12px; MARGIN: 10px; COLOR: #333
}
#box OL {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; LIST-STYLE-POSITION: inside; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; LIST-STYLE-TYPE: decimal
}
#box OL LI {
	MARGIN: 0px 0px 20px; LINE-HEIGHT: 18px
}
#box OL LI SPAN {
	CURSOR: pointer; COLOR: #00f; TEXT-DECORATION: underline
}
#box OL LI STRONG {
	DISPLAY: block
}
BODY .iframe .content {
	PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px
}
#box .title SPAN {
	FONT-SIZE: 12px
}
#box P {
	LINE-HEIGHT: 18px
}
</style>

<script type="text/javascript">
	function uploadSubmit(){
		var fname = $.trim($("#xlsFile").val());
	//	var postfixName = $.trim($("#excelPostfixName").val());
	//	alert("文件名==="+fname);
		if(fname == ""){
			$("#xlsFileSpan").html("请选择你要导入的文件.");
			return false;
		}else
		{
			//从最后一个点开始,截取3三个字符
			var subName = fname.substr(fname.lastIndexOf(".")+1,fname.length);
		//	alert("文件类型："+subName);
		//	alert("转换类型："+subName.trim().toUpperCase());
			if(subName.trim().toUpperCase() != "XLS" && subName.toUpperCase() != "XLSX"){
				$("#xlsFileSpan").html("你导入的文件格式不正确.");
				return false;
			}else{
				if(subName.trim().toUpperCase() == "XLS"){
					$("#excelPostfixName").val("xls");
				}else{
					$("#excelPostfixName").val("xlsx");
				}
			}
			
			var epn = $("#excelPostfixName").val();
			//alert("excelPostfixName="+epn);
			$("#xlsFileSpan").html("");
		}
	 //   $("#importFrm").submit();
	 //   document.importFrm.enctype ="multipart/form-data";
	//	document.importFrm.submit();
	dialog("正在导入数据请耐心等待...","id:waitgif","250px","auto","id");
		return true;
	}

</script>

  </head>
  
<body bgcolor="#F1F1F1" style="margin:0px; text-align:center;">

<div id="top">
 	<!-- 头部-->
 	<%@include file="/manage/mainTop.jsp"%>
</div>
<div id="top2"></div>

<!-- 中间-->
<div id="main1">
<!-- 左边-->
 <%@include file="/manage/mainLeft.jsp"%>
 <div class="mainr2">

<table width="791" height="465" border="0" cellpadding="0" cellspacing="0" bgcolor="#F1F1F1">
  <tr>
    <td width="835" height="39" align="left" valign="middle">
    <span class="STYLE1">&nbsp; <a href="bsumAction!toShowUserInfo.action">用户管理</a> &gt; &nbsp;用户查询</span>    </td>
  </tr>
  <DIV id=box>
  <tr>
    <td height="426" align="left" valign="top" >
    <table width="791" height="423" border="0" cellpadding="0" cellspacing="0" style="border-bottom:1px solid #DBDBDB;  border-left:1px solid #DBDBDB; " id="a2">
        <tr>
         <td width="1" style="border-bottom:1px solid #DBDBDB;"></td>
	       
	        <td width="132" align="center" background="../images/line3.jpg" style="border:1px solid #DBDBDB;">
        	    <a href="bsumAction!toShowUserInfo.action" class="STYLE11">用户查询管理</a>	 	        
        	</td>
        	
	        <td width="6" style="border-bottom:1px solid #DBDBDB;">&nbsp;</td>
	        <td width="115" align="center" background="../images/line3.jpg" style="border:1px solid #DBDBDB;">
	        	<a href="bsumAction!toAddUserPage.action" class="STYLE11">添加用户</a>	        
	        </td>
				
			<td width="9" style="border-bottom:1px solid #DBDBDB;">&nbsp;</td>
	      <%--  <td width="132" align="center" background="../images/line3.jpg" style="border:1px solid #DBDBDB;">
        	    <a href="bsumAction!toDisplayAllUserList.action" class="STYLE11">用户列表</a>	 	        </td>--%>
        	  
        	<td width="137" height="22" align="center" bgcolor="#FFFFFF" style="border-top:1px solid #DBDBDB; border-right:1px solid #DBDBDB;" >批量导入用户</td>
				 
			<td width="6" style="border-bottom:1px solid #DBDBDB;">&nbsp;</td>
	        <td width="311" align="left" background="../images/line3.jpg" style="border:1px solid #DBDBDB;">
        	 <%-- <a href="bsumAction!toEnterUserInfoModPage.action" class="STYLE11">用户信息修改</a>    --%>     </td>
		
         </tr>
 
        <tr>
          <td height="400" colspan="8" align="center" valign="top" bgcolor="#FFFFFF" style="border-right:1px solid #DBDBDB;">
          <table width="772" height="80" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td height="16" align="center"><span style="color:red" id="timeSpan"></span></td>
            </tr>
        
            <tr>
              <td height="64">
			    <s:form name="importFrm" id="importFrm" action="bsumAction!doBatchImportUserData.action" enctype="multipart/form-data" method="post" onsubmit="return uploadSubmit();">
			      
				   <table height="68" border="0" align="center" cellpadding="0" cellspacing="0">
				    <tr>     
	                	<td align="center" style="color:green;">&nbsp;<s:property value="actionError" /></td>      
	                </tr>
				    <tr>
			          <td height="31"><s:hidden name="excelPostfixName" id="excelPostfixName" value=""></s:hidden></td>
			        </tr>
			        <tr>
			          <td height="31"><input type="file" name="xlsFile" id="xlsFile" size="40" accept="image/xls,xlsx" /></td>
			        </tr>
			        <tr>
			          <td height="16"><span class="STYLE16">&nbsp;文件格式:&nbsp;xls,&nbsp;xlsx</span></td>
			        </tr>
			        <tr>
			          <td height="7">&nbsp;</td>
			        </tr>
			        <tr>
			          <td height="21">
			            <input type="submit" value="导入数据 " class="button" />
			            <input type="reset"  value=" 取  消 "  />&nbsp;&nbsp;
			            <span id="xlsFileSpan" style="color: red;"></span>
								<%-- 展示错误的字幕	<s:actionerror/>	
						&nbsp;&nbsp;
						<span style="color: red;"><s:property value="#session.htErrFileSize"/></span>--%>	
			          </td>
			        </tr>
			        <tr>
			          <td height="7">&nbsp;</td>
			        </tr>
			        <tr>
			          <td height="7"><a href="articleAction!downExcel.action?fileType=2003"><u>2003Excel文件模版下载</u></a></td>
			        </tr>
			        <tr>
			          <td height="7">&nbsp;</td>
			        </tr>
			<%----%><tr>
			          <td height="7"><a href="articleAction!downExcel.action?fileType=2007"><u>2007Excel文件模版下载</u></a></td>
			        </tr>
			        
			        
			      </table>
			    </s:form>
              </td>
            </tr>
 			<tr>
              <td height="20"></td>
            </tr>
             <tr>
              <td height="16" align="left" style="color:red;"><s:actionerror /></td>
             </tr>
          </table>

          </td>
        </tr>
      </table>
   </td>
  </tr>
  </DIV>
</table>

</div>


</div>

<DIV id="waitgif" style="DISPLAY: none">
<img src="images/jdt.gif"></img>
</DIV>
</body>
<P/><P/>
</html>
